<?php
/**
 * 异常错误码
 */

namespace App\Utils\Enums;


class ExceptionEnums
{
    const SUCCESS = 0; // 成功 200
    const UNREGISTER = 1000;//未注册 401
    const UN_AUTH = 1001;//未登录 401
    const USER_DISABLED = 1002;//已禁用 422
    const PARAM_ERROR = 2000;//参数级错误 422
    const SERVICE_ERROR = 3000;//业务级错误 422
    const SYSTEM_ERROR = 4000;//系统框架错误 500
    const UNKNOWN_ERROR = -1;//未知错误 500

    //  code与http对照码
    const HTTP_CODE_LIST = [
        0 => 200,
        1000 => 401,
        1001 => 401,
        1002 => 422,
        2000 => 422,
        3000 => 422,
        4000 => 500,
        -1 => 500,
    ];
}